<template>
    <div>
        <ParentChildTable_v2 :tableData="tableData" :columns="columns" :childrenColumn="childrenColumn"></ParentChildTable_v2>
    </div>
</template>
<script>
    import ParentChildTable_v2 from "../components/baseComponents/parentChildTable_v2";
    export default {
        name:"parentChildTable_v2",
        components:{ParentChildTable_v2},
        data(){
            return{
                // 父级表头数据
                columns:[
                    {label:"商品名称",prop:"name", },
                    {label:"所属店铺",prop:"shop"},
                    {label:"商品ID",prop:"id"},
                    {label:"店铺ID",prop:"shopId"},
                    {label:"商品分类",prop:"category"},
                    {label:"店铺地址",prop:"address"},
                    {label:"商品描述",prop:"desc"},
                ],
                // 子级表头数据
                childrenColumn:[
                    {label:"商品名称",prop:"name"},
                    {label:"所属店铺",prop:"shop"},
                    {label:"商品ID",prop:"id"},
                    {label:"店铺ID",prop:"shopId"},
                    {label:"商品分类",prop:"category"},
                    {label:"店铺地址",prop:"address"},
                    {label:"商品描述",prop:"desc"},
                ],
                // 数据
                tableData: [{
                    id: '12987122',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333',
                    children:[{ id: '12987122',
                                name: '好滋好味鸡蛋仔',
                                category: '江浙小吃、小吃零食',
                                desc: '荷兰优质淡奶，奶香浓而不腻',
                                address: '上海市普陀区真北路',
                                shop: '王小虎夫妻店',
                                shopId: '10333'
                                },{
                                    id: '12987123',
                                    name: '好滋好味鸡蛋仔',
                                    category: '江浙小吃、小吃零食',
                                    desc: '荷兰优质淡奶，奶香浓而不腻',
                                    address: '上海市普陀区真北路',
                                    shop: '王小虎夫妻店',
                                    shopId: '10333'
                                }]
                }, {
                    id: '12987123',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333',
                    children:[]
                }, {
                    id: '12987125',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333',
                    children:[]
                }, {
                    id: '12987126',
                    name: '好滋好味鸡蛋仔',
                    category: '江浙小吃、小吃零食',
                    desc: '荷兰优质淡奶，奶香浓而不腻',
                    address: '上海市普陀区真北路',
                    shop: '王小虎夫妻店',
                    shopId: '10333',
                    children:[{id: '12987126',
                        name: '好滋好味鸡蛋仔',
                        category: '江浙小吃、小吃零食',
                        desc: '荷兰优质淡奶，奶香浓而不腻',
                        address: '上海市普陀区真北路',
                        shop: '王小虎夫妻店',
                        shopId: '10333',}]
                }]
            }
        }
    }
</script>
